#!/bin/sh
set -eu

cd `dirname $0`

CPPCHECK="/usr/bin/cppcheck"
CPPCHECK_OPTIONS="--enable=all --verbose --inline-suppr \
-I src/main/fixparser/ \
--template '{file}:{line}:{severity}:{id}:{message}'"

find ./src -type f -print | fgrep -v "CMakeLists.txt" | fgrep -v ".svn" | xargs ${CPPCHECK} ${CPPCHECK_OPTIONS}
